{%extends "base.html"%}
{%block title%}
        <title>Administracion - Listado de Clases</title>
{%endblock title%}

{%block maincontent%}
{%load pagination_tags%}
{%autopaginate obj_list 40%}
<h2>Listado de Clases</h2>
<br>

<a href="{% url admon.views.home%}" class="btn btn-inverse"><i class="icon-arrow-left icon-white"></i> Regresar</a>

<a href="{% url admon.views.clase_create%}" class="btn btn-success pull-right"><i class="icon-plus icon-white"></i> Agregar Clase</a>
<br>
<br>

{%paginate%}

<table class="table table-striped table-bordered table-condensed">

    <thead>
        <tr>
            <th>ID</th>
            <th>Docente</th>
            <th>Día</th>
            <th>Inicio</th>
            <th>Fin</th>
            <th>Periodo</th>
            <th>Editar</th>
            <th>Eliminar</th>
        </tr>    
    </thead>

    <tbody>
        {%for obj in obj_list%}
        <tr>
            <td>{{obj.id}}</td>
            <td>{{obj.docente}}</td>
            <td>{{obj.get_dia_display}}</td>
            <td>{{obj.hora_inicio|time:"H:i"}}</td>
            <td>{{obj.hora_fin|time:"H:i"}}</td>
            <td>{{obj.periodo}}</td>
            <td><a href="{% url admon.views.clase_modify obj.id%}"><i class="icon-pencil"></i> Editar</a></td>
            <td><a href="{% url admon.views.clase_warning obj.id %}"><i class="icon-remove"></i> Eliminar</a></td>
        </tr>
        {%endfor%}
 
    </tbody>

</table>
{%paginate%}

{%endblock%}
